package mail;

import jdk.nashorn.internal.objects.annotations.Getter;
import jdk.nashorn.internal.objects.annotations.Setter;

import java.util.Properties;

/**
 * Created by Administrator on 2018/6/4.
 */
public class MailUtil {
    // 收件人电子邮箱
    String to = "abcd@gmail.com";

    // 发件人电子邮箱
    String from = "web@gmail.com";

    // 指定发送邮件的主机为 localhost
    String host = "localhost";

    public MailUtil() {
        // 获取系统属性
        Properties properties = System.getProperties();
        // 设置邮件服务器
        properties.setProperty("mail.smtp.host", host);
        // 获取默认session对象
//        Session session = Session.getDefaultInstance(properties);
    }

}
